﻿using HuaweiCloud.Dotnet.Samples.ESports.Main.Dtos;
using HuaweiCloud.Dotnet.Samples.ESports.Main.Manager;
using Microsoft.AspNetCore.Mvc;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace HuaweiCloud.Dotnet.Samples.ESports.Main.Controllers
{
    [Route("api-main/v1/[controller]")]
    [Route("api/v1/[controller]")]
    [ApiController]
    public class RankController : ControllerBase
    {
        private readonly IRankManager _manager;
        public RankController(IRankManager manager)
        {
            _manager = manager;
        }
        [HttpGet]
        public async Task<ActionResult<List<RankDto>>> Get()
        {
            return Ok(await _manager.GetDailyRankAsync());
        }
    }
}
